"use strict";
const Ajax = (url, callback, type = 'get') => {
    const xhr = new XMLHttpRequest();
    xhr.open(url, type, true);
    xhr.send();
    xhr.onreadystatechange = () => {
        if (xhr.status === 200 && xhr.readyState === 4) {
            callback(JSON.parse(xhr.response));
        }
    };
};
